package com.dogdog.bean;

import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.Response.ErrorListener;
import com.android.volley.toolbox.ImageRequest;
import com.dogdog.manager.C;
import com.dogdog.manager.MyApplication;

import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;

public class RoundUserInfo {
	private Bitmap user_face;
	private String user_name;
	private String pet_name;
	private String pet_kind;
	private String pet_age;
	private String distance;
	
	public String getDistance() {
		return distance;
	}
	public void setDistance(String distance) {
		this.distance = distance;
	}
	public Bitmap getUser_face() {
		if(user_face==null){
			ImageRequest bit=new ImageRequest(
					C.URL.FACE_PATH+user_face, 
					new Response.Listener<Bitmap>() {
						@Override
						public void onResponse(Bitmap bitmap) {
							user_face=bitmap;		
						}
					},
					 0, 0, Config.ARGB_8888, new ErrorListener() {
						@Override
						public void onErrorResponse(VolleyError error){
							user_face=MyApplication.getUnkowBit();	
						}
					}){
			};
		MyApplication.getHttpQueue().add(bit);	
			}
		return user_face;
	}
	public void setUser_face(Bitmap user_face) {
		this.user_face = user_face;
	}
	public String getUser_name() {
		return user_name;
	}
	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}
	public String getPet_name() {
		return pet_name;
	}
	public void setPet_name(String pet_name) {
		this.pet_name = pet_name;
	}
	public String getPet_kind() {
		return pet_kind;
	}
	public void setPet_kind(String pet_kind) {
		this.pet_kind = pet_kind;
	}
	public String getPet_age() {
		return pet_age;
	}
	public void setPet_age(String pet_age) {
		this.pet_age = pet_age;
	}
	

}
